package GameSrc;

import java.awt.*;

public class Cannon extends GameObject{

    private double angle;


    public Cannon(int x, int y, GameWindow gameWindow, double angle) {
        super(100,152, x, y, "Game/img/cannon1.png", gameWindow);
        this.angle=angle;
    }


    public void paintCannon(Graphics g){
        Graphics2D g2d = (Graphics2D) g;
        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        g2d.rotate(angle,this.getX()+50,this.getY()+76);
        g2d.drawImage(this.getImg(),this.getX(),this.getY(),null);
    }


}
